<div class="pad-def bg-default bor-b-def">
  <h2 class="no-margin">我的成绩</h2>
</div>

<div class="wrapper-md bg-white">
  <form class="form-horizontal over-hide clearfix pad-def  bor-def mar-b-def">
    <div class="form-group col-lg-4 col-sm-6 col-xs-12 ">
      <label class="control-label col-xs-12 col-sm-3">课程：</label>
      <p class="col-xs-12 col-sm-9">
        <input class="form-control" placeholder="课程关键字"
               [(ngModel)]="searchParams.keyword" name="keyword"/>
      </p>
    </div>
    <div class="form-group col-lg-4 col-sm-6 col-xs-12">

      <p class="col-xs-12 col-lg-9 col-sm-offset-3">
        <button class="btn btn-primary" (click)="search()">搜索</button>
        <button class="btn btn-default" (click)="resetParams()">重置</button>
      </p>
    </div>
  </form>
  <p-dataTable #dt [value]="tableData"  scrollHeight="200px" emptyMessage="暂无数据" >
    <p-header>
      <div class="ui-helper-clearfix text-left">
        <a class="btn btn-sm btn-info pull-right" (click)="dt.exportCSV()" ><i class="fa fa-file-o"></i>导出CSV</a>
      </div>
    </p-header>
    <p-column field="courseId" header="id"></p-column>
    <p-column field="studentId" header="学号"></p-column>
    <p-column field="studentName" header="姓名"></p-column>
    <p-column field="major" header="专业"></p-column>
    <p-column field="gradeName" header="年级"></p-column>
    <p-column field="courseName" header="课程"></p-column>
    <p-column field="score" header="分数"></p-column>
    <p-footer>
      <paginator *ngIf="page.count" [(index)]="page.pageIndex" [(pageSize)]="page.pageSize" [count]="page.count" size="sm" (onChangePage)="query()"></paginator>
    </p-footer>
  </p-dataTable>
</div>
